Skip to content

Comments

Improving compatibility with EqSchema for Schema Coercion#5

Merged
macielti merged 3 commits intomainfrom
implement-schem-eq-keyword-support
Jan 11, 2026
Merged

Improving compatibility with EqSchema for Schema Coercion#5
macielti merged 3 commits intomainfrom
implement-schem-eq-keyword-support

Conversation

@macielti
Copy link
Owner

Changed

  • Breaking Change: Error handling for request body validation has been updated.
    • The error code for schema validation failures is now invalid-request-body-payload.
    • Error messages for invalid request bodies are improved for clarity.
    • Error details in responses are now consistently stringified.
  • Schema Coercion: String values in JSON request bodies are now automatically coerced to keywords when the schema
    expects a keyword, improving compatibility with EqSchema.

@macielti macielti changed the title implementation Improving compatibility with EqSchema for Schema Coercion Jan 11, 2026
@macielti macielti requested a review from Copilot January 11, 2026 19:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves schema coercion compatibility with EqSchema by automatically converting string values to keywords when expected by the schema, and updates error handling for request body validation with clearer error messages and consistent detail formatting.

Changes:

  • Implemented custom json-matcher function to coerce string values to keywords for EqSchema with keyword values
  • Updated error handling for request body validation with new error code "invalid-request-body-payload" and improved messages
  • Stringified error details in responses for consistency

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/service_component/interceptors.clj Added json-matcher function for EqSchema coercion; updated wire-in-body-schema error handling with new error code, message, and stringified details
test/unit/service_component/interceptors_test.clj Added tests for EqKeywordSchema coercion covering both successful coercion and validation failure cases
test/integration/service_component_test.clj Updated integration tests to reflect new error code, message format, and stringified error details
project.clj Bumped version from 6.4.3 to 7.4.3 to reflect breaking changes
CHANGELOG.md Documented breaking changes and new schema coercion feature for version 7.4.3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@macielti macielti merged commit 3cc1f62 into main Jan 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant